package com.huanzhidadi.rabbitmq.seqqueue.consumer;

import com.huanzhidadi.rabbitmq.seqqueue.entity.MessageInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Random;

@Component
@RabbitListener(queues = "q_seq2")
public class Consumer21 {
    @RabbitHandler
    public void onMessage(MessageInfo message) {
        System.out.println("c21:" + message.getId() + ":" + message.getMsg());
    }
}